Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make filter accept a single object #148

Closed
wants to merge 1 commit into from

Conversation

gabegorelick
Copy link
Collaborator

Work in progress

  • contexts
  • plurals
  • make sure extraction is possible
  • more tests

Example use:

<div attr="{{ 'Message' | translate:'{context: \"ctx\", plural: \"\\{\\{$count\\}\\} boten\", n: \"count\"}' }}"></div>

Continuation of #122

@gabegorelick
Copy link
Collaborator Author

As I mentioned [1], this PR changes the existing API because Angular doesn't support passing object literals to filters in expressions. But there have been no releases with the existing translate filter API, so it shouldn't break anything.

[1] rubenv/angular-gettext-tools#63 (comment)

@gabegorelick
Copy link
Collaborator Author

Yeah, this is pretty gross looking. Might have to resort to some hacks to work around Angular's suckiness.

@gabegorelick
Copy link
Collaborator Author

#150 looks more promising

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant